hysop.core.arrays.array_backend module¶
- class hysop.core.arrays.array_backend.ArrayBackend(allocator, **kwds)[source]¶
Bases:
TaggedObject
Interface of an abstract array backend. An array backend is a numpy work-alike collection of functions that performs its computations on arrays on various devices.
Most of exposed functions should work exactly as in numpy, some default arguments are changed to match HySoP parameters (default ordering, default floating point type,
default integer type, default device, …)
All exposed functions are @classmethods, and this class cannot be instanciated.
Arithmetic methods, when available, should at least support the broadcasting of scalars.
See this link for more information about numpy routines: https://docs.scipy.org/doc/numpy/reference/routines.html
A backend implementation may expose subsets of the following routine sections (as listed on previous link):
Array creation routines
Array manipulation routines
Binary operations
Discrete Fourier Transform
Functional programming
Input and Output
Linear Algebra
Logic functions
Mathematical functions
Random sampling
Set routines
Sorting searching and counting
Statistics
- Currently unimplemented/unsupported features:
String Operations
C-Types Foreign Function Interface
Datetime Support Functions
Data type routines
Optionally Scipy-accelerated routines
Mathematical functions with automatic domain
Floating point error handling
NumPy-specific help functions
Financial functions
Indexing routines
Masked Array operations
Matrix library
Miscellaneous routines
Padding arrays
Polynomials
Test support
Window functions
By default, all exposed methods raise a NotImplementedError with an explicit message through the _not_implemented_yet method.
Initialize an ArrayBackend with guven allocator.
- all(a, axis=None, out=None)[source]¶
Test whether all array elements along a given axis evaluate to True.
- allclose(a, b, rtol=1e-05, atol=1e-08, equal_nan=False)[source]¶
Returns True if two arrays are element-wise equal within a tolerance.
- property allocator¶
Get the allocated associated to this backend.
- any(a, axis=None, out=None)[source]¶
Test whether any array elements along a given axis evaluate to True.
- apply_along_axis(func1d, axis, arr, *args, **kwargs)[source]¶
Apply a function to 1-D slices along the given axis.
- arange(dtype=<class 'numpy.int32'>, *args, **kargs)[source]¶
Return evenly spaced values within a given interval.
- arctan2(x1, x2, out=None)[source]¶
Element-wise arc tangent of x1/x2 choosing the quadrant correctly.
- argpartition(a, kth, axis=-1, kind='quicksort', order=None)[source]¶
Perform an indirect partition along the given axis using the algorithm specified by the kind keyword.
- argsort(a, axis=-1, kind='quicksort', order=None)[source]¶
Returns the indices that would sort an array.
- around(a, decimals=0, out=None)[source]¶
Evenly round to the given number of decimals, returns HYSOP_INTEGER.
- array(object, dtype=None, copy=True, order=C_CONTIGUOUS(0), subok=False, ndmin=0)[source]¶
Create an array.
- array2string(a, max_line_width=None, precision=None, suppress_small=None, separator=' ', prefix='', style=<built-in function repr>, formatter=None)[source]¶
Return a string representation of an array.
- array_equiv(a1, a2)[source]¶
returns True if input arrays are shape consistent and all elements equal.
- array_repr(arr, max_line_width=None, precision=None, supress_small=None)[source]¶
Return the string representation of an array.
- array_str(a, max_line_width=None, precision=None, suppress_small=None)[source]¶
Return a string representation of the data in an array.
- asanyarray(a, dtype=None, order=C_CONTIGUOUS(0))[source]¶
Convert the input to an ndarray, but pass ndarray subclasses through.
- asarray_chkfinite(a, dtype=None, order=C_CONTIGUOUS(0))[source]¶
Convert the input to an array, checking for NaNs or Infs.
- asboolarray(a, order=C_CONTIGUOUS(0), **kargs)¶
Convert the input to an array of dtype HYSOP_BOOL.
- ascomplexarray(a, order=C_CONTIGUOUS(0), **kargs)¶
Convert the input to an array of dtype HYSOP_COMPLEX.
- asdimarray(a, order=C_CONTIGUOUS(0), **kargs)¶
Convert the input to an array of dtype HYSOP_DIM.
- asindexarray(a, order=C_CONTIGUOUS(0), **kargs)¶
Convert the input to an array of dtype HYSOP_INDEX.
- asintegerarray(a, order=C_CONTIGUOUS(0), **kargs)¶
Convert the input to an array of dtype HYSOP_INTEGER.
- asrealarray(a, order=C_CONTIGUOUS(0), **kargs)¶
Convert the input to an array of dtype HYSOP_REAL.
- average(a, axis=None, weights=None, returned=False)[source]¶
Compute the weighted average along the specified axis.
- base_repr(number, base=2, padding=0)[source]¶
Return a string representation of a number in the given base system.
- binary_repr(num, width=None)[source]¶
Return the binary representation of the input number as a string.
- bincount(x, weights=None, minlength=None)[source]¶
Count number of occurrences of each value in array of non-negative ints.
- bool_empty(shape, order=C_CONTIGUOUS(0), **kargs)¶
Return a new array of given shape and type, without initializing entries.
- bool_full(shape, fill_value, order=C_CONTIGUOUS(0), **kargs)¶
Return a new array of given shape, filled with fill_value of type HYSOP_BOOL.
- bool_ones(shape, order=C_CONTIGUOUS(0), **kargs)¶
Return a new array of given shape filled with ones of type HYSOP_BOOL.
- bool_prod(a, axis=None, out=None, **kargs)¶
Sum of array elements over a given axis.
- bool_sum(a, axis=None, out=None, **kargs)¶
Sum of array elements over a given axis.
- bool_zeros(shape, order=C_CONTIGUOUS(0), **kargs)¶
Return a new array of given shape, filled with zeros of type HYSOP_BOOL.
- abstract can_wrap(handle, **kargs)[source]¶
Should return True if handle is an Array or a array handle corresponding this backend.
- choice(a, size=None, replace=True, p=None)[source]¶
Generates a random sample from a given 1-D array
- complex_empty(shape, order=C_CONTIGUOUS(0), **kargs)¶
Return a new array of given shape and type, without initializing entries.
- complex_full(shape, fill_value, order=C_CONTIGUOUS(0), **kargs)¶
Return a new array of given shape, filled with fill_value of type HYSOP_COMPLEX.
- complex_ones(shape, order=C_CONTIGUOUS(0), **kargs)¶
Return a new array of given shape filled with ones of type HYSOP_COMPLEX.
- complex_prod(a, axis=None, out=None, **kargs)¶
Sum of array elements over a given axis.
- complex_sum(a, axis=None, out=None, **kargs)¶
Sum of array elements over a given axis.
- complex_zeros(shape, order=C_CONTIGUOUS(0), **kargs)¶
Return a new array of given shape, filled with zeros of type HYSOP_COMPLEX.
- convolve(a, v, mode='full')[source]¶
Returns the discrete, linear convolution of two one-dimensional sequences.
- cov(m, y=None, rowvar=True, bias=False, ddof=None, fweights=None, aweights=None)[source]¶
Estimate a covariance matrix, given data and weights.
- cross(a, b, axisa=-1, axisb=-1, axisc=-1, axis=None)[source]¶
Return the cross product of two (arrays of) vectors.
- cumprod(a, axis=None, dtype=None, out=None)[source]¶
Return the cumulative product of elements along a given axis.
- cumsum(a, axis=None, dtype=None, out=None)[source]¶
Return the cumulative sum of the elements along a given axis.
- digitize(x, bins, right=False)[source]¶
Return the indices of the bins to which each value in input array belongs.
- dim_empty(shape, order=C_CONTIGUOUS(0), **kargs)¶
Return a new array of given shape and type, without initializing entries.
- dim_full(shape, fill_value, order=C_CONTIGUOUS(0), **kargs)¶
Return a new array of given shape, filled with fill_value of type HYSOP_DIM.
- dim_ones(shape, order=C_CONTIGUOUS(0), **kargs)¶
Return a new array of given shape filled with ones of type HYSOP_DIM.
- dim_prod(a, axis=None, out=None, **kargs)¶
Sum of array elements over a given axis.
- dim_sum(a, axis=None, out=None, **kargs)¶
Sum of array elements over a given axis.
- dim_zeros(shape, order=C_CONTIGUOUS(0), **kargs)¶
Return a new array of given shape, filled with zeros of type HYSOP_DIM.
- dsplit(ary, indices_or_sections)[source]¶
Split array into multiple sub-arrays along the 3rd axis (depth).
- ediff1d(ary, to_end=None, to_begin=None)[source]¶
The differences between consecutive elements of an array.
- eigh(a, UPLO='L')[source]¶
Return the eigenvalues and eigenvectors of a Hermitian or symmetric matrix.
- einsum(subscripts, out=None, dtype=None, order=SAME_ORDER(3), casting='safe', optimize=False, *operands)[source]¶
Evaluates the Einstein summation convention on the operands.
- empty(shape, dtype=<class 'numpy.float64'>, order=C_CONTIGUOUS(0))[source]¶
Return a new array of given shape and type, without initializing entries.
- empty_like(a, dtype=None, order=SAME_ORDER(3), subok=True, shape=None)[source]¶
Return a new array with the same shape and type as a given array.
- fabs(x, out=None)[source]¶
Calculate the absolute value element-wise, outputs HYSOP_REAL unless out is set.
- fftn(a, s=None, axes=None, norm=None)[source]¶
Compute the N-dimensional discrete Fourier Transform.
- floor_divide(x1, x2, out=None)[source]¶
Return the largest integer smaller or equal to the division of the inputs.
- fmod(x1, x2, out=None)[source]¶
Return the element-wise remainder of division (REM). Remainder has the same sign as the divisor x2. This should not be confused with the Python modulus operator x1 % x2.
- frexp(x, out1=None, out2=None)[source]¶
Decompose the elements of x into mantissa and twos exponent.
- frombuffer(afer, dtype=<class 'numpy.float64'>, count=-1, offset=0)[source]¶
Interpret a afer as a 1-dimensional array.
- fromfile(file, dtype=<class 'numpy.float64'>, count=-1, sep='')[source]¶
Construct an array from data in a text or binary file.
- fromfunction(function, shape, dtype=<class 'numpy.float64'>)[source]¶
Construct an array by executing a function over each coordinate.
- fromiter(iterable, dtype=<class 'numpy.float64'>, count=-1)[source]¶
Create a new 1-dimensional array from an iterable object.
- fromregex(file, regexp, dtype)[source]¶
Construct an array from a text file, using regular expression parsing.
- fromstring(string, dtype=<class 'numpy.float64'>, count=-1, sep='')[source]¶
A new 1-D array initialized from raw binary or text data in a string.
- full(shape, fill_value, dtype=None, order=C_CONTIGUOUS(0))[source]¶
Return a new array of given shape and type, filled with fill_value.
- full_like(a, fill_value, dtype=None, order=SAME_ORDER(3), subok=True, shape=None)[source]¶
Return a full array with the same shape and type as a given array.
- genfromtxt(fname, dtype=<class 'numpy.float64'>, comments='#', delimiter=None, skip_header=0, skip_footer=0, converters=None, missing_values=None, filling_values=None, usecols=None, names=None, excludelist=None, deletechars=None, replace_space='_', autostrip=False, case_sensitive=True, defaultfmt='f%i', unpack=None, usemask=False, loose=True, invalid_raise=True, max_rows=None)[source]¶
Load data from a text file, with missing values handled as specified.
- geomspace(start, stop, num=50, endpoint=True, dtype=<class 'numpy.float64'>)[source]¶
Return numbers spaced evenly on a log scale (a geometric progression).
- static get_alignment_and_size(shape, dtype, min_alignment=None)[source]¶
Returns number of bytes to allocate an array of given shape and given dtype, aligned on given alignment. Returned alignment will be at least dtype.itemsize. Alignment should non zero and a power of two, or None in which case it will be set to 1.
- hfft(a, n=None, axis=-1, norm=None)[source]¶
Compute the FFT of a signal that has Hermitian symmetry, i.e., a real spectrum.
- histogram(a, bins=10, range=None, normed=False, weights=None, density=None)[source]¶
Compute the histogram of a set of data.
- histogram2d(x, y, bins, range=None, normed=False, weights=None)[source]¶
Compute the bi-dimensional histogram of two data samples.
- histogramdd(sample, bins, range=None, normed=False, weights=None)[source]¶
Compute the multidimensional histogram of some data.
- abstract property host_array_backend¶
- hsplit(ary, indices_or_sections)[source]¶
Split an array into multiple sub-arrays horizontally (column-wise).
- hypergeometric(ngood, nbad, nsample, size=None)[source]¶
Draw samples from a Hypergeometric distribution.
- ifft(a, n=None, axis=-1, norm=None)[source]¶
Compute the one-dimensional inverse discrete Fourier Transform.
- ifft2(a, s=None, axes=None, norm=None)[source]¶
Compute the 2-dimensional inverse discrete Fourier Transform.
- ifftn(a, s=None, axes=None, norm=None)[source]¶
Compute the N-dimensional inverse discrete Fourier Transform.
- ihfft(a, n=None, axis=-1, norm=None)[source]¶
Compute the inverse FFT of a signal that has Hermitian symmetry.
- in1d(ar1, ar2, assume_unique=False, invert=False)[source]¶
Test whether each element of a 1-D array is also present in a second array.
- index_empty(shape, order=C_CONTIGUOUS(0), **kargs)¶
Return a new array of given shape and type, without initializing entries.
- index_full(shape, fill_value, order=C_CONTIGUOUS(0), **kargs)¶
Return a new array of given shape, filled with fill_value of type HYSOP_INDEX.
- index_ones(shape, order=C_CONTIGUOUS(0), **kargs)¶
Return a new array of given shape filled with ones of type HYSOP_INDEX.
- index_prod(a, axis=None, out=None, **kargs)¶
Sum of array elements over a given axis.
- index_sum(a, axis=None, out=None, **kargs)¶
Sum of array elements over a given axis.
- index_zeros(shape, order=C_CONTIGUOUS(0), **kargs)¶
Return a new array of given shape, filled with zeros of type HYSOP_INDEX.
- insert(arr, obj, values, axis=None)[source]¶
Insert values along the given axis before the given indices.
- integer_empty(shape, order=C_CONTIGUOUS(0), **kargs)¶
Return a new array of given shape and type, without initializing entries.
- integer_full(shape, fill_value, order=C_CONTIGUOUS(0), **kargs)¶
Return a new array of given shape, filled with fill_value of type HYSOP_INTEGER.
- integer_ones(shape, order=C_CONTIGUOUS(0), **kargs)¶
Return a new array of given shape filled with ones of type HYSOP_INTEGER.
- integer_prod(a, axis=None, out=None, **kargs)¶
Sum of array elements over a given axis.
- integer_sum(a, axis=None, out=None, **kargs)¶
Sum of array elements over a given axis.
- integer_zeros(shape, order=C_CONTIGUOUS(0), **kargs)¶
Return a new array of given shape, filled with zeros of type HYSOP_INTEGER.
- interp(x, xp, fp, left=None, right=None, period=None)[source]¶
One-dimensional linear interpolation.
- irfft(a, n=None, axis=-1, norm=None)[source]¶
Compute the inverse of the n-point DFT for real input.
- irfft2(a, s=None, axes=(-2, -1), norm=None)[source]¶
Compute the 2-dimensional inverse FFT of a real array.
- irfftn(a, s=None, axes=None, norm=None)[source]¶
Compute the inverse of the N-dimensional FFT of real input.
- isclose(a, b, rtol=1e-05, atol=1e-08, equal_nan=False)[source]¶
Returns a boolean array where two arrays are element-wise equal within a tolerance.
- isneginf(x, out=None)[source]¶
Test element-wise for negative infinity, return result as bool array.
- isposinf(x, out=None)[source]¶
Test element-wise for positive infinity, return result as bool array.
- laplace(loc=0.0, scale=1.0, size=None)[source]¶
Draw samples from the Laplace or double exponential distribution with specified location (or mean=0.0) and scale (decay).
- linspace(start, stop, num=50, endpoint=True, retstep=False, dtype=<class 'numpy.float64'>)[source]¶
Return evenly spaced numbers over a specified interval.
- load(mmap_mode=None, allow_pickle=True, fix_imports=True, encoding='ASCII')[source]¶
Load arrays or pickled objects from .npy, .npz or pickled files.
- loadtxt(dtype=<class 'numpy.float64'>, comments='#', delimiter=None, converters=None, skiprows=0, usecols=None, unpack=False, ndmin=0)[source]¶
Load data from a text file.
- logaddexp2(x1, x2, out=None)[source]¶
Logarithm of the sum of exponentiations of the inputs in base-2.
- logspace(start, stop, num=50, endpoint=True, base=10.0, dtype=<class 'numpy.float64'>)[source]¶
Return numbers spaced evenly on a log scale.
- property max_alloc_size¶
Get the maximal size of allocatable contiguous chunk of memory in bytes.
- mean(a, axis=None, dtype=None, out=None)[source]¶
Compute the arithmetic mean along the specified axis.
- median(a, axis=None, out=None, overwrite_input=False)[source]¶
Compute the median along the specified axis.
- mod(x1, x2, out=None)[source]¶
Return element-wise remainder of division (MOD). Remainder has the same sign as the divident x1. It is complementary to the function floor_divide and match Python modfulus operator x1 % x2.
- modf(x, out1=None, out2=None)[source]¶
Return the fractional and integral parts of an array, element-wise.
- moveaxis(a, source, destination)[source]¶
Move axes of an array to new positions. Axe 0 is the slowest varying index, last axe is the fastest varying index.
- multivariate_normal(mean, cov, size=None)[source]¶
Draw random samples from a multivariate normal distribution.
- nanargmax(a, axis=None)[source]¶
Return the indices of the maximum values in the specified axis ignoring NaNs.
- nanargmin(a, axis=None)[source]¶
Return the indices of the minimum values in the specified axis ignoring NaNs.
- nancumprod(a, axis=None, dtype=None, out=None)[source]¶
Return the cumulative product of array elements over a given axis treating Not a Numbers (NaNs) as one.
- nancumsum(a, axis=None, dtype=None, out=None)[source]¶
Return the cumulative sum of array elements over a given axis treating Not a Numbers (NaNs) as zero.
- nanmax(a, axis=None, out=None)[source]¶
Return the maximum of an array or maximum along an axis, ignoring any NaNs.
- nanmean(a, axis=None, dtype=None, out=None)[source]¶
Compute the arithmetic mean along the specified axis, ignoring NaNs.
- nanmedian(a, axis=None, out=None, overwrite_input=False)[source]¶
Compute the median along the specified axis, while ignoring NaNs.
- nanmin(a, axis=None, out=None)[source]¶
Return minimum of an array or minimum along an axis, ignoring any NaNs.
- nanpercentile(a, q, axis=None, out=None, overwrite_input=False, interpolation='linear')[source]¶
Compute the qth percentile of the data along the specified axis, while ignoring nan values.
- nanprod(a, axis=None, dtype=None, out=None)[source]¶
Return the product of array elements over a given axis treating Not a Numbers (NaNs) as ones.
- nanstd(a, axis=None, dtype=None, out=None, ddof=0)[source]¶
Compute the standard deviation along the specified axis, while ignoring NaNs.
- nansum(a, axis=None, dtype=None, out=None)[source]¶
Return the sum of array elements over a given axis treating Not a Numbers (NaNs) as zero.
- nanvar(a, axis=None, dtype=None, out=None, ddof=0)[source]¶
Compute the variance along the specified axis, while ignoring NaNs.
- noncentral_chisquare(df, nonc, size=None)[source]¶
Draw samples from a noncentral chi-square distribution.
- noncentral_f(dfnum, dfden, nonc, size=None)[source]¶
Draw samples from the noncentral F distribution.
- normal(loc=0.0, scale=1.0, size=None)[source]¶
Draw random samples from a normal (Gaussian) distribution.
- ones(shape, dtype=None, order=C_CONTIGUOUS(0))[source]¶
Return a new array of given shape and type, filled with ones.
- ones_like(a, dtype=None, order=SAME_ORDER(3), subok=True, shape=None)[source]¶
Return an array of ones with the same shape and type as a given array.
- packbits(myarray, axis=None)[source]¶
Packs the elements of a binary-valued array into bits in a uint8 array.
- pareto(a, size=None)[source]¶
Draw samples from a Pareto II or Lomax distribution with specified shape.
- partition(a, kth, axis=-1, kind='quicksort', order=None)[source]¶
Return a partitioned copy of an array.
- percentile(a, q, axis=None, out=None, overwrite_input=False, interpolation='linear')[source]¶
Compute the qth percentile of the data along the specified axis.
- power(x1, x2, out=None)[source]¶
First array elements raised to powers from second array, element-wise.
- prod(a, axis=None, dtype=None, out=None)[source]¶
Return the product of array elements over a given axis.
- randint(low, high=None, size=None, dtype=<class 'numpy.int32'>)[source]¶
Return random integers from low (inclusive) to high (exclusive).
- random_integers(low, high=None, size=None)[source]¶
Random integers of type np.int between low and high, inclusive.
- real_empty(shape, order=C_CONTIGUOUS(0), **kargs)¶
Return a new array of given shape and type, without initializing entries.
- real_full(shape, fill_value, order=C_CONTIGUOUS(0), **kargs)¶
Return a new array of given shape, filled with fill_value of type HYSOP_REAL.
- real_if_close(a, tol=100)[source]¶
If complex input returns a real array if complex parts are close to zero.
- real_ones(shape, order=C_CONTIGUOUS(0), **kargs)¶
Return a new array of given shape filled with ones of type HYSOP_REAL.
- real_prod(a, axis=None, out=None, **kargs)¶
Sum of array elements over a given axis.
- real_sum(a, axis=None, out=None, **kargs)¶
Sum of array elements over a given axis.
- real_zeros(shape, order=C_CONTIGUOUS(0), **kargs)¶
Return a new array of given shape, filled with zeros of type HYSOP_REAL.
- remainder(x1, x2, out=None, **kargs)[source]¶
Return element-wise remainder of division (MOD). Remainder has the same sign as the divisor x2. match Python modfulus operator x1 % x2. Returns x - y*floor(x/y)
- require(a, dtype=None, requirements=None)[source]¶
Return an ndarray of the provided type that satisfies requirements.
- reshape(a, newshape, order=C_CONTIGUOUS(0))[source]¶
Gives a new shape to an array without changing its data.
- rfft(a, n=None, axis=-1, norm=None)[source]¶
Compute the one-dimensional discrete Fourier Transform for real input.
- rfftfreq(n=None, d=1.0)[source]¶
Return the Discrete Fourier Transform sample frequencies (for usage with rfft, irfft).
- rfftn(a, s=None, axes=None, norm=None)[source]¶
Compute the N-dimensional discrete Fourier Transform for real input.
- rollaxis(a, axis, start=0)[source]¶
Roll the specified axis backwards, until it lies in a given position. Axe 0 is the slowest varying index, last axe is the fastest varying index.
- save(arr, file, allow_pickle=True, fix_imports=True)[source]¶
Save an array to a binary file in NumPy .npy format.
- savetxt(fname, X, fmt='%.18e', delimiter=' ', newline='\n', header='', footer='', comments='# ')[source]¶
Save an array to a text file.
- savez(file, *args, **kwds)[source]¶
Save several arrays into a single file in uncompressed .npz format.
- savez_compressed(file, *args, **kwds)[source]¶
Save several arrays into a single file in compressed .npz format.
- searchsorted(a, v, side='left', sorter=None)[source]¶
Find indices where elements should be inserted to maintain order.
- set_printoptions(precision=None, threshold=None, edgeitems=None, linewidth=None, suppress=None, nanstr=None, infstr=None, formatter=None)[source]¶
Set printing options.
- set_string_function(f, repr=True)[source]¶
Set a Python function to be used when pretty printing arrays.
- standard_normal(size=None)[source]¶
Draw samples from a standard Normal distribution (mean=0.0, stdev=1).
- standard_t(df, size=None)[source]¶
Draw samples from a standard Student’s t distribution with df degrees of freedom.
- std(a, axis=None, dtype=None, out=None, ddof=0)[source]¶
Compute the standard deviation along the specified axis.
- swapaxes(a, axis1, axis2)[source]¶
Interchange two axes of an array. Axe 0 is the slowest varying index, last axe is the fastest varying index.
- trace(a, offset=0, axis1=0, axis2=1, dtype=None, out=None)[source]¶
Return the sum along diagonals of the array.
- transpose(a, axes=None)[source]¶
Permute the dimensions of an array. Axe 0 is the slowest varying index, last axe is the fastest varying index. Default permutation is (0,…,ndim-1).
- trapz(y, x=None, dx=1.0, axis=-1)[source]¶
Integrate along the given axis using the composite trapezoidal rule.
- tri(N, M=None, k=0, dtype=<class 'numpy.float64'>)[source]¶
An array with ones at and below the given diagonal and zeros elsewhere.
- triangular(left, mode, right, size=None)[source]¶
Draw samples from the triangular distribution over the interval left, right.
- trim_zeros(filt, trim='fb')[source]¶
Trim the leading and/or trailing zeros from a 1-D array or sequence.
- unique(ar, return_index=False, return_inverse=False, return_counts=False)[source]¶
Find the unique elements of an array.
- unpackbits(myarray, axis=None)[source]¶
Unpacks elements of a uint8 array into a binary-valued output array.
- unwrap(p, discont=3.141592653589793, axis=-1)[source]¶
Unwrap by changing deltas between values to 2*pi complement.
- var(a, axis=None, dtype=None, out=None, ddof=0)[source]¶
Compute the variance along the specified axis.
- vectorize(pyfunc, otypes=None, doc=None, excluded=None, cache=False, signature=None)[source]¶
Generalized function class.
- vsplit(ary, indices_or_sections)[source]¶
Split an array into multiple sub-arrays vertically (row-wise).
- wald(mean=0.0, scale=1.0, size=None)[source]¶
Draw samples from a Wald, or inverse Gaussian, distribution.
- abstract wrap(handle, **kargs)[source]¶
Create a backend specific Array from the corresponding array handle.
- zeros(shape, dtype=None, order=C_CONTIGUOUS(0))[source]¶
Return a new array of given shape and type, filled with zeros.